DROP TABLE IF EXISTS jms_dwd.dwd_network_waybill_summary_dt;

CREATE EXTERNAL TABLE IF NOT EXISTS jms_dwd.dwd_network_waybill_summary_dt(
network_code                    String             COMMENT '寄件网点编码',
network_name                    String             COMMENT '寄件网点名称',
franchisee_code                 String             COMMENT '加盟商编码',
franchisee_name                 String             COMMENT '加盟商名称',
subordinate_agent_code          String             COMMENT '代理区编码',
subordinate_agent_name          String             COMMENT '代理区名称',
taking_cnt                      bigint             COMMENT '发货量'   -- 区分实际揽收量
)
COMMENT '客户异常监控运单信息明细表'
PARTITIONED BY (dt string COMMENT '运单录入日期(yyyy-MM-dd)')
STORED AS PARQUET
LOCATION '/dw/hive/jms_dwd.db/external/dwd_network_waybill_summary_dt'
TBLPROPERTIES (
'discover.partitions'='false',
'parquet.column.index.access'='true'
);

MSCK REPAIR TABLE jms_dwd.dwd_network_waybill_summary_dt;